package com.rc.pojo.po;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.JacksonTypeHandler;
import com.rc.common.model.BaseImgEntity;
import com.rc.common.model.BaseUserEntity;
import com.rc.common.model.ImageModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 *  实体类。
 *
 * @author 27806
 * @since 2024-06-16
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "adoption", schema = "rc")
public class Adoption implements BaseUserEntity, BaseImgEntity,Serializable  {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 活动名称
     */
    private String title;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 认养简介
     */
    private String description;

    @Column(typeHandler = JacksonTypeHandler.class)
    private List<ImageModel> imgs;

    private Long plantId;

    /**
     * 预计收益
     */
    private BigDecimal expectedRevenue;

    /**
     * 发货周期
     */
    private String deliveryCycle;

    /**
     * 发货方式
     */
    private String deliveryMethod;

    /**
     * 评分
     */
    private Double score;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @Column(tenantId = true)
    private Long farmId;

    private Long createUser;

    private Long updateUser;
}
